package com.google.code.UtopiaXml;

import java.util.List;
import java.util.Set;

/**
 * Interface specifying that the implementor can appear as a content in an
 * Indicator.
 *
 * @author Michael Simacek
 */
public interface IndicatorContent {

    /**
     * Returns list of all names to be mathed against to determine whether a
     * found element is contained in this class.
     *
     * @return all element names
     */
    public List<String> getMatchStrings();

    /**
     * Generates block of parser code that can parse the elements containend in
     * this class. Given Node is parsed and then set onto the next element.
     *
     * @param cb Codebuilder to append code to
     * @param parentObject name of result object to call set methods
     * @param nodeName name of the Node instance to parse
     */
    public void generateParserBlock(CodeBuilder cb, String parentObject, String nodeName);

    /**
     * Returns a Set of all Properties that should be included as attributes in
     * parent class.
     *
     * @return properties for parent class (hence MultiIndicatros return only
     * property referencing itself, not its contents)
     */
    public Set<Property> getProperties();
}
